package fictional.Common;

import java.util.Date;

/**
 * Represents a message between two characters 
 */
public class MessageItem extends SocialItem{

	public MessageItem(int id, ShortCharacterItem sender, ShortCharacterItem receiver,
			Date date, String message, boolean isRead) {
		super(id, sender, receiver, date);
		this.message = message;
		this.isRead = isRead;
	}
	
	public String getMessage() {
		return message;
	}
	/**
	 * Indicates whether this message was read by the character
	 * @return True if the message was read by the character
	 */
	public boolean isRead() {
		return isRead;
	}
	/**
	 * Marks the current instance as read 
	 */
	public void markAsRead() {
		isRead = true;
	}
	
	private String message;
	private boolean isRead;
}
